﻿using System;
using System.Collections.Generic;
using System.Text;
using ProcessControl.Entity;
using System.Data;

namespace ProcessControl.Interface
{
    public interface ICapex
    {
        /// <summary>
        /// 通过capex号获取capex的明细信息
        /// </summary>
        /// <param name="capexNumber">capex单号</param>
        /// <returns></returns>
        List<CapexDetailEntity> GetCapexDetailByCapexNO(string capexNumber);

        /// <summary>
        /// 获取Buget的余额
        /// </summary>
        /// <param name="BugetNo">Buget号</param>
        /// <returns></returns>
        double GetBugetBalace(string BugetNo);

        /// <summary>
        /// 获取Capex的金额
        /// </summary>
        /// <param name="BugetNo"></param>
        /// <returns></returns>
        double GetCapexAmout(string FormId, string BugetNo);

        /// <summary>
        /// 获取Capex已使用的金额
        /// </summary>
        /// <param name="FormId"></param>
        /// <param name="BugetNo"></param>
        /// <returns></returns>
        double GetCapexUsedAmout(string FormId, string BugetNo);

        /// <summary>
        /// 更新Capex的行数据状态
        /// </summary>
        /// <param name="BugetNumber"></param>
        /// <param name="FormID"></param>
        /// <returns></returns>
        bool UpdateRowsStatus(string BugetNumber, string FormID, double CurrAmount);

        /// <summary>
        /// 更新终止本次Capex的余额至预算表中
        /// </summary>
        /// <param name="CapexFormId"></param>
        /// <param name="CurrPRAmout"></param>
        /// <param name="CapexName"></param>
        /// <param name="BudgetNumber"></param>
        /// <returns></returns>
        bool UpdateEndAmount(string CapexFormId, double CurrPRAmout, string CapexName, string BudgetNumber);

        /// <summary>
        /// 更新Capex表的已使用金额
        /// </summary>
        /// <param name="BugetNumber"></param>
        /// <param name="FormID"></param>
        /// <returns></returns>
        bool UpdateUsedAmount(string BugetNumber, string FormID, double CurrAmount);

        List<Entity.CapexDetailEntity> GetCapexDetailByCapexNO(string capexNumber, string BugetNumber);

        /// <summary>
        /// 获取项目负责人
        /// </summary>
        /// <returns></returns>
        DataTable Excel();

        /// <summary>
        /// 获取项目支出原因
        /// </summary>
        /// <returns></returns>
        DataTable GetProjectReason();
    }
}
